<?php
namespace App\Admin\Controllers;

use App\Http\Controllers\Controller;
use App\Http\Logic\Api\ImportLogic;
use App\Http\Requests\Request;

class ImportController extends Controller
{
    //导入数据
    public function import(Request $request)
    {
        try {
            $params = $request->all();
            return $this->success(
                (new ImportLogic())->import($params)
            );
        }catch (\Exception $e){
            return $this->error($e->getMessage());
        }
    }
}
